<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/amazeui.min.css" />
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/hy.admin.css" />
	</head>

	<body>
		<div class="am-g">
			{include file='../Common/hy_header.html'}
			<div class="am-u-md-6 am-u-end">
				<form class="am-form am-form-horizontal hy-js-form">
					<div class="am-form-group">
						<label for="user-intro" class="am-u-sm-3 am-form-label">次数类型</label>
						<div class="am-u-sm-9">
							<div class="am-btn-group">
								<label class="am-btn am-btn-xs">
									<input type="radio" name="count_type" value="0" {if $info.count_type eq 0 || $info.count_type eq ''}checked="checked"{/if}> 不限次数
								</label>
								<label class="am-btn am-btn-xs">
									<input type="radio" name="count_type" {if $info.count_type eq 1} checked="checked"{/if} value="1"> 每天游戏次数
								</label>
								<label class="am-btn am-btn-xs">
									<input type="radio" name="count_type" {if $info.count_type eq 2}checked="checked"{/if} value="2"> 一共游戏次数
								</label>
							</div>
						</div>
					</div>
					<div class="am-form-group yf-game-count" {if $info.count_type gt 0}{else}style="display: none;"{/if}>
						<label for="user-name" class="am-u-sm-3 am-form-label">游戏次数</label>
						<div class="am-u-sm-9">
							<input type="text" name="game_count" value="{$info.game_count}" placeholder="请输入游戏次数">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-intro" class="am-u-sm-3 am-form-label">是否有分享规则</label>
						<div class="am-u-sm-9">
							<div class="am-btn-group">
								<label class="am-btn am-btn-xs">
									<input type="radio" name="is_share" value="0" {if $info.is_share eq 0 || $info.is_share eq ''}checked="checked"{/if}> 没有
								</label>
								<label class="am-btn am-btn-xs">
									<input type="radio" name="is_share" {if $info.is_share eq 1} checked="checked"{/if} value="1"> 有
								</label>
							</div>
						</div>
					</div>
					<div class="yf-share-type" {if $info.is_share neq 1}style="display: none;"{/if}>
						<div class="am-form-group">
							<label for="user-name" class="am-u-sm-3 am-form-label">分享后得到次数</label>
							<div class="am-u-sm-9">
								<input type="text" name="share_count" value="{$info.share_count}" placeholder="请输入次数">
							</div>
						</div>	
						<div class="am-form-group">
							<label for="user-intro" class="am-u-sm-3 am-form-label">分享规则类型</label>
							<div class="am-u-sm-9">
								<div class="am-btn-group">
									<label class="am-btn am-btn-xs">
										<input type="radio" name="share_type" value="1" {if $info.share_type eq 1 || $info.share_type eq ''}checked="checked"{/if}> 分享就能获得
									</label>
									<label class="am-btn am-btn-xs">
										<input type="radio" name="share_type" {if $info.share_type eq 2} checked="checked"{/if} value="2"> 分享且用户点击完成游戏后获得
									</label>
								</div>
							</div>
						</div>
						<div class="am-form-group">
							<label for="user-name" class="am-u-sm-3 am-form-label">最大分享次数</label>
							<div class="am-u-sm-9">
								<input type="text" name="max_share" value="{$info.max_share}" placeholder="请输入最大分享次数">
							</div>
						</div>					
					</div>
					<div class="am-form-group">
						<label for="user-intro" class="am-u-sm-3 am-form-label">加分规则</label>
						<div class="am-u-sm-9">
							<div class="am-btn-group">
								<label class="am-btn am-btn-xs">
									<input type="radio" name="add_type" value="0" {if $info.add_type eq 0 || $info.add_type eq ''}checked="checked"{/if}> 不开启
								</label>
								<label class="am-btn am-btn-xs">
									<input type="radio" name="add_type" {if $info.add_type eq 1} checked="checked"{/if} value="1"> 开启
								</label>
							</div>
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-intro" class="am-u-sm-3 am-form-label">限制</label>
						<div class="am-u-sm-9">
							<div class="am-btn-group">
								<label class="am-btn am-btn-xs">
									<input type="radio" name="limit_status" value="0" {if $info.limit_status eq 0 || $info.limit_status eq ''}checked="checked"{/if}> 不开启
								</label>
								<label class="am-btn am-btn-xs">
									<input type="radio" name="limit_status" {if $info.limit_status eq 1} checked="checked"{/if} value="1"> 开启
								</label>
							</div>
						</div>
					</div>		
					<div class="yf-limit-status" {if $info.limit_status neq 1}style="display: none;"{/if}>
						<div class="am-form-group">
							<label for="user-intro" class="am-u-sm-3 am-form-label">时间</label>
							<div class="am-u-sm-9">
								<div class="am-btn-group">
									<label class="am-btn am-btn-xs">
										<input type="radio" name="limit_time" value="1800" {if $info.limit_time eq 1800 || $info.limit_time eq ''}checked="checked"{/if}> 30分钟
									</label>
									<label class="am-btn am-btn-xs">
										<input type="radio" name="limit_time" {if $info.limit_time eq 3600} checked="checked"{/if} value="3600"> 1小时
									</label>
									<label class="am-btn am-btn-xs">
										<input type="radio" name="limit_time" {if $info.limit_time eq 7200} checked="checked"{/if} value="7200"> 2小时
									</label>
								</div>
							</div>
						</div>	
						<div class="am-form-group">
							<label for="user-name" class="am-u-sm-3 am-form-label">限制次数</label>
							<div class="am-u-sm-9">
								<input type="text" name="limit_count" value="{$info.limit_count}" placeholder="请输入限制次数">
							</div>
						</div>
					</div>		
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">结束提交期限</label>
						<div class="am-u-sm-9">
							<input type="text" data-am-datepicker name="last_date" value="{$info.last_date}" placeholder="">
						</div>
					</div>
					<div class="am-form-group">
						<div class="am-u-sm-9 am-u-sm-push-3">
							<input type="hidden" name="id" value="{$info.id}">
							<button type="button" class="am-btn am-btn-primary hy-js-submit">提交</button>
						</div>
					</div>
				</form>
			</div>
		</div>
		{include file='../Common/hy_footer.html'}
		<script type="text/javascript">
			$(function(){
				$('input[name=count_type]').click(function(){
					var val = $(this).val();
					if(val > 0)
					{
						$('.yf-game-count').show();
					}
					else
					{
						$('.yf-game-count').hide();
					}
				});
				
				$('input[name=is_share]').click(function(){
					var val = $(this).val();
					if(val > 0)
					{
						$('.yf-share-type').show();
					}
					else
					{
						$('.yf-share-type').hide();
					}
				});
				
				$('input[name=limit_status]').click(function(){
					var val = $(this).val();
					if(val > 0)
					{
						$('.yf-limit-status').show();
					}
					else
					{
						$('.yf-limit-status').hide();
					}
				});
			});
			hy_submit('index.php?g=admin&m=gift&a={$action}');
		</script>
	</body>

</html>